import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  mode: 'hash',
  scrollBehavior (to, from, savedPosition) {
      return { x: 0, y: 0 }
  },
  routes: [
    //首页
    { path: '/homepage', name: 'homepage',component: function (resolve) { require(['@/page/home/homepage.vue'], resolve)},meta: { show: true}},
    //邀请有奖
    { path: '/invitation', name: 'Invitation',component: function (resolve) { require(['@/page/home/Invitation.vue'], resolve)},meta: { show: false}},
    //代驾
    { path: '/drive', name: 'drive',component: function (resolve) { require(['@/page/home/drive.vue'], resolve)},meta: { show: false}},
    //保养年卡
    { path: '/yearCard', name: 'yearCard',component: function (resolve) { require(['@/page/home/yearCard.vue'], resolve)},meta: { show: false}},
    //智能保养(保养年卡)
    { path: '/cardMaintain/:id', name: 'cardMaintain',component: function (resolve) { require(['@/page/maintain/cardMaintain.vue'], resolve)},meta: { show: false}},
    //分时优惠(保养年卡)
    { path: '/cardSchedule', name: 'cardSchedule',component: function (resolve) { require(['@/page/maintain/cardSchedule.vue'], resolve)},meta: { show: false}},
    //我的模块
    { path: '/mine', name: 'mine',component: function (resolve) { require(['@/page/my/mine.vue'], resolve)},meta: { show: true}},
    //我的评价功能
    { path: '/myComment', name: 'myComment',component: function (resolve) { require(['@/page/my/myComment.vue'], resolve)},meta: { show: false}},
    //登录
    { path: '/login', name: 'login',component: function (resolve) { require(['@/page/my/login.vue'], resolve)},meta: { show: false}},
    //注册
    { path: '/register', name: 'register',component: function (resolve) { require(['@/page/my/register.vue'], resolve)},meta: { show: false}},
    //收货地址
    { path: '/address', name: 'address',component: function (resolve) { require(['@/page/carAdd/address.vue'], resolve)},meta: { show: false}},
    //更新收货地址
    { path: '/updateAddress', name: 'updateAddress',component: function (resolve) { require(['@/page/carAdd/updateAddress.vue'], resolve)},meta: { show: false}},
    //选择地址
    { path: '/selectAddress', name: 'selectAddress',component: function (resolve) { require(['@/page/carAdd/selectAddress.vue'], resolve)},meta: { show: false}},
    //购物车
    { path: '/shoppingCart', name: 'shoppingCart',component: function (resolve) { require(['@/page/my/shoppingCart.vue'], resolve)},meta: { show: true}},
    //我的券包
    { path: '/ticket', name: 'ticket',component: function (resolve) { require(['@/page/my/ticket.vue'], resolve)},meta: { show: false}},
    //消息中心
    { path: '/msgCenter', name: 'msgCenter',component: function (resolve) { require(['@/page/my/msgCenter.vue'], resolve)},meta: { show: false}},
    //消息列表
    { path: '/newsList', name: 'newsList',component: function (resolve) { require(['@/page/my/newsList.vue'], resolve)},meta: { show: false}},
    //物流列表
    { path: '/flowList', name: 'flowList',component: function (resolve) { require(['@/page/my/flowList.vue'], resolve)},meta: { show: false}},
    //活动列表
    { path: '/actList', name: 'actList',component: function (resolve) { require(['@/page/my/actList.vue'], resolve)},meta: { show: false}},
    //我的收藏
    { path: '/collect', name: 'collect',component: function (resolve) { require(['@/page/my/collect.vue'], resolve)},meta: { show: false}},
    //个人信息
    { path: '/personalInfo', name: 'personalInfo',component: function (resolve) { require(['@/page/my/personalInfo.vue'], resolve)},meta: { show: false}},
    //修改手机号码
    { path: '/modifyPhone', name: 'modifyPhone',component: function (resolve) { require(['@/page/my/modifyPhone.vue'], resolve)},meta: { show: false}},
    //修改密码
    { path: '/modifyPwd', name: 'modifyPwd',component: function (resolve) { require(['@/page/my/modifyPwd.vue'], resolve)},meta: { show: false}},
    //通心粉
    { path: '/macaroni', name: 'macaroni',component: function (resolve) { require(['@/page/my/macaroni.vue'], resolve)},meta: { show: false}},
    //我的通币
    { path: '/getMacaroni', name: 'getMacaroni',component: function (resolve) { require(['@/page/my/getMacaroni.vue'], resolve)},meta: { show: false}},
    //通币明细
    { path: '/macaroniDetail', name: 'macaroniDetail',component: function (resolve) { require(['@/page/my/macaroniDetail.vue'], resolve)},meta: { show: false}},
    //通币权益说明
    { path: '/macaroniExplain', name: 'macaroniExplain',component: function (resolve) { require(['@/page/my/macaroniExplain.vue'], resolve)},meta: { show: false}},
    //设置
    { path: '/setting', name: 'setting',component: function (resolve) { require(['@/page/my/setting.vue'], resolve)},meta: { show: false}},
    //关于我们
    { path: '/aboutUs', name: 'aboutUs',component: function (resolve) { require(['@/page/my/aboutUs.vue'], resolve)},meta: { show: false}},
    //意见反馈
    { path: '/feedback', name: 'feedback',component: function (resolve) { require(['@/page/my/feedback.vue'], resolve)},meta: { show: false}},
    //4S门店列表
    { path: '/store', name: 'store',component: function (resolve) { require(['@/page/cafe/store.vue'], resolve)},meta: { show: true}},
    //门店导航
    { path: '/storeMap', name: 'storeMap',component: function (resolve) { require(['@/page/cafe/storeMap.vue'], resolve)},meta: { show: false}},
    //4s门店详情新版
    { path: '/storeDetail/:id', name: 'storeDetail',component: function (resolve) { require(['@/page/cafe/storeDetail.vue'], resolve)},meta: { show: false}},
    //发现
    { path: '/discover', name: 'discover',component: function (resolve) { require(['@/page/discover/discover.vue'], resolve)},meta: { show: true}},
    //发现详情
    { path: '/discoverDetail/:id', name: 'discoverDetail',component: function (resolve) { require(['@/page/discover/discoverDetail.vue'], resolve)},meta: { show: false}},
    //停车场
    { path: '/parkingMap', name: 'parkingMap',component: function (resolve) { require(['@/page/home/parkingMap.vue'], resolve)},meta: { show: false}},
    //我的车辆
    { path: '/allCar', name: 'allCar',component: function (resolve) { require(['@/page/carAdd/allCar.vue'], resolve)},meta: { show: false}},
    //添加车辆
    { path: '/addCar', name: 'addCar',component: function (resolve) { require(['@/page/carAdd/addCar.vue'], resolve)},meta: { show: false}},
    //更新车辆
    { path: '/updateCar', name: 'updateCar',component: function (resolve) { require(['@/page/carAdd/updateCar.vue'], resolve)},meta: { show: false}},
    //选择车辆
    { path: '/selectCar', name: 'selectCar',component: function (resolve) { require(['@/page/carAdd/selectCar.vue'], resolve)},meta: { show: false}},
    //智能保养
    { path: '/maintainHome', name: 'maintainHome',component: function (resolve) { require(['@/page/maintain/maintainHome.vue'], resolve)},meta: { show: false}},
    //分时优惠
    { path: '/mSchedule', name: 'mSchedule',component: function (resolve) { require(['@/page/maintain/Schedule.vue'], resolve)},meta: { show: false}},
    // 违章
    { path: '/illegalHome', name: 'illegalHome',component: function (resolve) { require(['@/page/illegal/illegalHome.vue'], resolve)},meta: { show: false}},
    //违章缴费页面
    { path: '/illegalPay', name: 'illegalPay',component: function (resolve) { require(['@/page/illegal/illegalPay.vue'], resolve)},meta: { show: false}},
    //美容
    { path: '/cosmetology', name: 'cosmetology',component: function (resolve) { require(['@/page/cosmetology/cosmetology.vue'], resolve)},meta: { show: false}},
    //订单
    { path: '/order/:id', name: 'order',component: function (resolve) { require(['@/page/order/order.vue'], resolve)},meta: { show: false}},
    //订单详情
    { path: '/orderDetail/:id', name: 'orderDetail',component: function (resolve) { require(['@/page/order/orderDetail.vue'], resolve)},meta: { show: false}},
    //支付(除车品外的支付)
    { path: '/pay', name: 'pay',component: function (resolve) { require(['@/page/order/pay.vue'], resolve)},meta: { show: false}},
    //车品的支付页面
    { path: '/shopPay', name: 'shopPay',component: function (resolve) { require(['@/page/order/shopPay.vue'], resolve)},meta: { show: false}},
    //车品
    { path: '/carProduct', name: 'carProduct',component: function (resolve) { require(['@/page/carProduct/carProduct.vue'], resolve)},meta: { show: false}},
    //车品列表
    { path: '/productList', name: 'productList',component: function (resolve) { require(['@/page/carProduct/productList.vue'], resolve)},meta: { show: false}},
    //车品搜索
    { path: '/productSearch', name: 'productSearch',component: function (resolve) { require(['@/page/carProduct/productSearch.vue'], resolve)},meta: { show: false}},
    //商品详情
    { path: '/shopDetail/:id', name: 'shopDetail',component: function (resolve) { require(['@/page/carProduct/shopDetail.vue'], resolve)},meta: { show: false}},
    //评价页
    { path: '/comment/:id', name: 'comment',component: function (resolve) { require(['@/page/order/comment.vue'], resolve)},meta: { show: false}},
    //拼团列表
    { path: '/groupList', name: 'groupList',component: function (resolve) { require(['@/page/groupPurchase/groupList.vue'], resolve)},meta: { show: false}},
    //团购订单详情
    { path: '/gOrderDetail/:id', name: 'gOrderDetail',component: function (resolve) { require(['@/page/groupPurchase/gOrderDetail.vue'], resolve)},meta: { show: false}},
    //团购提醒
    { path: '/gRemind', name: 'gRemind',component: function (resolve) { require(['@/page/groupPurchase/gRemind.vue'], resolve)},meta: { show: false}},
    //支付成功（拼团）
    { path: '/gPaySuccess/:id', name: 'gPaySuccess',component: function (resolve) { require(['@/page/groupPurchase/gPaySuccess.vue'], resolve)},meta: { show: false}},
    //拼团详情
    { path: '/groupDetail/:id', name: 'groupDetail',component: function (resolve) { require(['@/page/groupPurchase/groupDetail.vue'], resolve)},meta: { show: false}},
    //授权绑定号码
    { path: '/modifyGroup', name: 'modifyGroup',component: function (resolve) { require(['@/page/my/modifyGroup.vue'], resolve)},meta: { show: false}},
    //一分开团
    { path: '/oneGroup', name: 'oneGroup',component: function (resolve) { require(['@/page/groupPurchase/oneGroup.vue'], resolve)},meta: { show: false}},
    //免费开团
    { path: '/freeGroup', name: 'freeGroup',component: function (resolve) { require(['@/page/groupPurchase/freeGroup.vue'], resolve)},meta: { show: false}},
    //免团券
    { path: '/groupVoucher', name: 'groupVoucher',component: function (resolve) { require(['@/page/my/groupVoucher.vue'], resolve)},meta: { show: false}},
    //加油站
    { path: '/gasStation', name: 'gasStation',component: function (resolve) { require(['@/page/home/gasStation.vue'], resolve)},meta: { show: false}},
    //充电桩
    { path: '/ChargingPile', name: 'ChargingPile',component: function (resolve) { require(['@/page/home/ChargingPile.vue'], resolve)},meta: { show: false}},
    //中奖详情
    { path: '/winingDetail/:id', name: 'winingDetail',component: function (resolve) { require(['@/page/groupPurchase/winingDetail.vue'], resolve)},meta: { show: false}},
    //中奖列表
    { path: '/winingList', name: 'winingList',component: function (resolve) { require(['@/page/groupPurchase/winingList.vue'], resolve)},meta: { show: false}},
    //获取往期中奖详情接口
    { path: '/winingListDetail/:id', name: 'winingListDetail',component: function (resolve) { require(['@/page/groupPurchase/winingListDetail.vue'], resolve)},meta: { show: false}},
    //登录用户页（用来测试）
    { path: '/loginUser', name: 'loginUser',component: function (resolve) { require(['@/page/loginUser.vue'], resolve)},meta: { show: false}},
    //代金券兑换
    { path: '/exchangeTicket', name: 'exchangeTicket',component: function (resolve) { require(['@/page/my/exchangeTicket.vue'], resolve)},meta: { show: false}},
    //砍价列表
    { path: '/cutPriceList', name: 'cutPriceList',component: function (resolve) { require(['@/page/cutPrice/cutPriceList.vue'], resolve)},meta: { show: false}},
    //砍价详情
    { path: '/cutPriceDetail/:id', name: 'cutPriceDetail',component: function (resolve) { require(['@/page/cutPrice/cutPriceDetail.vue'], resolve)},meta: { show: false}},
    //客服功能页面
    { path: '/customerService', name: 'customerService', component: function (resolve) { require(['@/page/customer/customerService.vue'], resolve)}, meta:{ show: false }},
    //客服页面的建议反馈
    { path: '/toChatService', name: 'toChatService', component: function (resolve) { require(['@/page/customer/toChatService.vue'], resolve) }, meta: { show: false } },
    //记一笔加油入口
    { path: '/rememberOilEntry', name: 'rememberOilEntry', component: function (resolve) { require(['@/page/rememberOil/rememberOilEntry.vue'], resolve) }, meta: { show: false } },
    //记一笔加油加车
    { path: '/oilAddCar', name: 'oilAddCar', component: function (resolve) { require(['@/page/rememberOil/oilAddCar.vue'], resolve) }, meta: { show: false } },
    //加油记录
    { path: '/rememberOilRecord/:id', name: 'rememberOilRecord', component: function (resolve) { require(['@/page/rememberOil/rememberOilRecord.vue'], resolve) }, meta: { show: false } },
    { path: '/test', name: 'comments',component: function (resolve) { require(['@/page/comment.vue'], resolve)},meta: { show: false}},
    //我的问答
     { path: '/doAnswer/:id', name: 'doAnswer',component: function (resolve) { require(['@/page/my/doAnswer.vue'], resolve)},meta: { show: false}},
    //我的问题
    { path: '/question', name: 'question',component: function (resolve) { require(['@/page/my/question.vue'], resolve)},meta: { show: false}},
    //问题详情
    { path: '/questionDetail/:id', name: 'questionDetail',component: function (resolve) { require(['@/page/my/questionDetail.vue'], resolve)},meta: {show: false}},
    //我来提问
    { path: '/doQuestion/:id', name: 'doQuestion',component: function (resolve) { require(['@/page/my/doQuestion.vue'], resolve)},meta: {show: false}},
    //全部提问
    { path: '/allQuestion/:id', name: 'allQuestion',component: function (resolve) { require(['@/page/my/allQuestion.vue'], resolve)},meta: {show: false}},
    //钣喷优选店
     { path: '/paint', name: 'paint',component: function (resolve) { require(['@/page/cafe/paint.vue'], resolve)},meta: {show: false}},
    //我的编辑车辆
    { path: '/myUpdateCar/:id', name: 'myUpdateCar',component: function (resolve) { require(['@/page/my/myUpdateCar.vue'], resolve)},meta: {show: false}},
    //所有车
    { path: '/oilAllCar', name: 'oilAllCar',component: function (resolve) { require(['@/page/rememberOil/oilAllCar.vue'], resolve)},meta: {show: false}},

    //默认主页
    { path: '*', redirect:'/homepage'}
  ]
})
